import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JLabel;
import javax.swing.JToggleButton;
import javax.swing.JRadioButtonMenuItem;
import javax.swing.JRadioButton;
import javax.swing.ButtonGroup;
import javax.swing.JButton;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.ImageIcon;
import java.awt.Font;


public class HomePageStudent extends JFrame {
	private final ButtonGroup buttonGroup = new ButtonGroup();

	/**
	 * Create the panel.
	 */
	public HomePageStudent(final String user) {
		getContentPane().setBackground(Color.ORANGE);
		getContentPane().setLayout(null);
		
		JLabel lblHomepage = new JLabel("HOMEPAGE");
		lblHomepage.setFont(new Font("Arial", Font.BOLD, 17));
		lblHomepage.setBounds(188, 40, 116, 24);
		getContentPane().add(lblHomepage);
		
		final JRadioButton rdbtnPersonalInformation = new JRadioButton("Personal Information");
		buttonGroup.add(rdbtnPersonalInformation);
		rdbtnPersonalInformation.setBounds(116, 101, 188, 24);
		getContentPane().add(rdbtnPersonalInformation);
		
		final JRadioButton rdbtnStudentServices = new JRadioButton("Student Services");
		buttonGroup.add(rdbtnStudentServices);
		rdbtnStudentServices.setBounds(116, 162, 141, 23);
		getContentPane().add(rdbtnStudentServices);
		
		JButton btnNext = new JButton("NEXT");
		btnNext.addActionListener(new ActionListener(){
			 public void actionPerformed(ActionEvent e)
	            {
				 if (rdbtnStudentServices.isSelected()){
					 dispose();
					 new StudentServices(user);
				 }
				 else if(rdbtnPersonalInformation.isSelected()){
					 dispose();
					 new StuPersonalInfo(user);
				 }
	            }
		});
		btnNext.setBounds(72, 245, 117, 29);
		getContentPane().add(btnNext);
		
		JButton btnLogout = new JButton("LOGOUT");
		btnLogout.addActionListener(new ActionListener(){
			public void actionPerformed(ActionEvent e){
				dispose();
				new LogIn();
			}
		});
		btnLogout.setBounds(314, 245, 117, 29);
		getContentPane().add(btnLogout);
		
		JLabel lblNewLabel = new JLabel("");
		lblNewLabel.setIcon(new ImageIcon(HomePageStudent.class.getResource("/resources/p-331002-georgia-tech-yellow-jackets-black-spare-tire-cover-jt-2324558420.jpg")));
		lblNewLabel.setBounds(349, 6, 281, 166);
		getContentPane().add(lblNewLabel);
		setPreferredSize(new Dimension(700, 300));
		pack();
		setVisible(true);
		setTitle("Home Page");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

	}
}
